<form name="form" method="post" action="?module=backoffice&action=AjaxContext&href={$href}" class="nyroModal">
{t assignTo=title}Add page{/t}
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalTitle.html" title=$title}
<div id="formsuccess" style="display:none">{if isset($errors.status) && $errors.status == "success"}{$page->getEditUrl($page->getLang())}{/if}</div>
<div id="modalContent">
    <table class="listTable">
        {t assignTo=help}Label - Label is only used to identify the page in the admin panel.{/t}
        <tr>
            <td>{icon name="help.png" class="toolTip" title=$help}</td>
            <td>{t}Label{/t} :</td>
            <td>
                <input type="text" name="form[label]" value="{$values.label|escape:"html"}" style="width:300px" title=""/>
               {if isset($errors.label)} {icon name="warning.png"} {$errors.label}{/if}
            </td>
        </tr>
        {t assignTo=help}URL - URL is the address where the page will be showed. You can add an .html extension or not.{/t}
        <tr>
            <td>{icon name="help.png" class="toolTip" title=$help}</td>
            <td>{t}URL{/t} :</td>
            <td>
                http://{$website->getUrl()}/<input type="text" name="form[url]" value="{$values.url}" style="width:200px" title=""/>{if isset($errors.url) && $errors.url != "copy"} {icon name="warning.png"} {$errors.url}{/if}
            </td>
        </tr>
        {if isset($errors.url) && $errors.url == 'copy'}
        <tr>
            <td></td>
            <td></td>
            <td>{icon name="warning.png} {t}Be careful, a page with the same URL is already published.{/t}<br /><input type="checkbox" name="form[forceSwitch]" /> {t}Force replacement of the{/t} <a href="{$URL_RELATIVE}{$pageToSwitch->getUrl()}" target="_blank">{t}page{/t} "{$pageToSwitch->getLabel()}"</a> {t}by this current one.{/t}</td>
        </tr>
        {/if}
        {t assignTo=help}Template - A template is a predefined model composed by fixed and/or free areas where you can put blocks. All these blocks will compose the final page.{/t}
        <tr>
            <td>{icon name="help.png" class="toolTip" title=$help}</td>
            <td>{t}Template{/t} :</td><td>
            <select name="form[template]" title="">
                {foreach from=$templates item=template}
                    <option value="{$template.fileName}" {if isset($values.template) && $values.template == $template.fileName}selected="selected"{/if}>{$template.label}</option>
                {/foreach}
            </select>
        </td></tr>
    </table>
</div>
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalFooter.html"}
</form>
